Skip to content

Form actions refresh plus paypal#3093

Open
Crabcyborg wants to merge 367 commits intorock/form-actions-refreshfrom
forms_actions_refresh_plus_paypal
Open

Form actions refresh plus paypal#3093
Crabcyborg wants to merge 367 commits intorock/form-actions-refreshfrom
forms_actions_refresh_plus_paypal

Conversation

@Crabcyborg
Copy link
Copy Markdown
Contributor

@Crabcyborg Crabcyborg commented May 7, 2026

Closes https://github.com/Strategy11/formidable-pro/issues/6124

Requires https://github.com/Strategy11/formidable-pro/pull/6381/changes to work properly with multi-page forms.

Includes PayPal (originally #2678)
Include Form Actions refresh (originally #2999)

The PayPal update adds:

  • New PayPal global payment settings (with buttons to onboard like our Stripe and Square gateways).
  • New PayPal Commerce payment action.
  • Payment actions are now split into "Stripe", "Square", and "PayPal" actions. Payment action icons no longer exist unless the Authorize.Net add-on is active, since there is no icon for this gateway (and other possible custom gateways).
  • Many new payment settings specific to PayPal (Product Name, PayPal Button Settings, Customer syncing behaviour, Shipping address data).
  • Various UI changes for payment actions (the gateways radio buttons have been replaced by tab buttons and moved to the top of the action, the one time/recurring payment setting has been moved to the top of the action).

…ent values in the SDK url based on the actions
…e, hide the collect payment action as well, add another helper function for on form settings page
…dden for gateway settings, add pay later toggle
…t gateway details out of plugin and add a new filter
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 7, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: feec280c-327f-4f8a-8e24-382fb71aee62

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch forms_actions_refresh_plus_paypal

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@deepsource-io
Copy link
Copy Markdown

deepsource-io Bot commented May 7, 2026

DeepSource Code Review

We reviewed changes in 0144975...f1fd5e2 on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

Code Review Summary

Analyzer Status Updated (UTC) Details
PHP May 7, 2026 12:36p.m. Review ↗
JavaScript May 7, 2026 12:36p.m. Review ↗

Important

AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.

@deepsource-io
Copy link
Copy Markdown

deepsource-io Bot commented May 7, 2026

DeepSource Code Review

We reviewed changes in e1563e4...541da16 on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

Important

Some issues found as part of this review are outside of the diff in this pull request and aren't shown in the inline review comments due to GitHub's API limitations. You can see those issues on the DeepSource dashboard.

PR Report Card

Overall Grade   Security  

Reliability  

Complexity  

Hygiene  

Code Review Summary

Analyzer Status Updated (UTC) Details
PHP May 8, 2026 5:34p.m. Review ↗
JavaScript May 8, 2026 5:34p.m. Review ↗

Important

AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.

* @param string $type
* @param array $field
*/
if ( apply_filters( 'frm_show_normal_field_type', $this->normal_field, $this->type, $this->field ) ) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function apply_filters invoked with 4 parameters, 2 required


The function call is not valid, which will result in a fatal runtime error.

die( 'You are not allowed to call this page directly.' );
}

$limit = $action_control->action_options['limit'];
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Variable $action_control might not be defined


A variable has been used but not defined, which may result in warnings during program execution. This can also cause bugs since the intended usage scope of the variable is not known.


$limit = $action_control->action_options['limit'];

if ( 'paypal' === $action_control->id_base ) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Variable $action_control might not be defined


A variable has been used but not defined, which may result in warnings during program execution. This can also cause bugs since the intended usage scope of the variable is not known.

if ( class_exists( 'FrmPaymentAction' ) ) {
class FrmDefPayPalLegacyAction extends FrmPaymentAction {
public function __construct() {
parent::__construct();
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FrmDefPayPalLegacyAction::__construct() calls parent::__construct() but FrmDefPayPalLegacyAction does not extend any class


Invalid call to a static method. This would lead to a run time error.

public function __construct() {
parent::__construct();

$this->id_base = 'paypal-legacy';
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Access to an undefined property FrmDefPayPalLegacyAction::$id_base


This issue is raised when an attempt is made to access an undefined property.
This may not have been intended, and it is advisable to give the code another look to make sure the property is defined in the scope it is used in.

* @param array $settings
* @param int $form_id
*/
return apply_filters( 'frm_paypal_style', $style, $settings, $form_id );
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function apply_filters invoked with 4 parameters, 2 required


The function call is not valid, which will result in a fatal runtime error.

* @param array $style_for_js
* @param WP_Post $form_action
*/
return apply_filters( 'frm_paypal_button_style', $style_for_js, $form_action );
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function apply_filters invoked with 3 parameters, 2 required


The function call is not valid, which will result in a fatal runtime error.

*
* @return array Array of products with prices and quantities.
*/
private static function get_pricing_data_from_posted_values( $form_id ) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

`get_pricing_data_from_posted_values` has a cyclomatic complexity of 16 with "High" risk


A function with high cyclomatic complexity can be hard to understand and
maintain. Cyclomatic complexity is a software metric that measures the number of
independent paths through a function. A higher cyclomatic complexity indicates
that the function has more decision points and is more complex.

*
* @return array
*/
private static function get_shipping_data_from_posted_values( $action ) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

`get_shipping_data_from_posted_values` has a cyclomatic complexity of 24 with "High" risk


A function with high cyclomatic complexity can be hard to understand and
maintain. Cyclomatic complexity is a software metric that measures the number of
independent paths through a function. A higher cyclomatic complexity indicates
that the function has more decision points and is more complex.


// Flush all output.
ob_end_flush();
@ob_flush();
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Errors should not be suppressed


Suppressing errors using an error control operator(@) is discouraged. Instead of ignoring the raised error, it should be fixed accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant